﻿using System;
using Backend.JYD.Messages.Resource;

namespace Backend.JYD.Messages.Manager
{
    public class ConfigMessages
    {
		#region Enums

        public enum Messages
        {
            CannotFindTheSectionName,
            ConnotFindTheConnectString,
            CannotFindTheAttributeName,
            TheSectionHasnotChildNodes,
            TheSectionConfigError,
            HasMoreThanOneEnableLogger,
            LoggerHasMoreThanOneType,
            TheAttributeValueIsError,
            TheSectionExistMoreThenOneConfig
        }

		#endregion

		#region Construction / destruction

        protected ConfigMessages()
		{
		}

		#endregion

		#region Methods

        public static string GetMessage(Messages Message)
        {
            string message = String.Empty;

            switch (Message)
            {
                case Messages.CannotFindTheSectionName:
                        message = Config.CannotFindTheSectionName;
                        break;
                case Messages.ConnotFindTheConnectString:
                        message = Config.ConnotFindTheConnectString;
                        break;
                case Messages.CannotFindTheAttributeName:
                        message = Config.CannotFindTheAttributeName;
                        break;
                case Messages.TheSectionHasnotChildNodes:
                        message = Config.TheSectionHasnotChildNodes;
                        break;
                case Messages.TheSectionConfigError:
                        message = Config.TheSectionConfigError;
                        break;
                case Messages.HasMoreThanOneEnableLogger:
                        message = Config.HasMoreThanOneEnableLogger;
                        break;
                case Messages.LoggerHasMoreThanOneType:
                        message = Config.LoggerHasMoreThanOneType;
                        break;
                case Messages.TheAttributeValueIsError:
                        message = Config.TheAttributeValueIsError;
                        break;
                case Messages.TheSectionExistMoreThenOneConfig:
                        message = Config.TheSectionExistMoreThenOneConfig;
                        break;
                    
            }

            return message;
        }

		#endregion

    }
}
